<?php

namespace plugin\admin\app\model;

use plugin\admin\app\model\Base;
use plugin\admin\app\model\traits\Listable;

/**
 * @property integer $id (主键)
 * @property integer $category_id 活动分类ID
 * @property string $desc 活动描述
 * @property string $title 活动名称
 * @property string $price 收费标准
 * @property integer $min_count 最低参与人数
 * @property integer $max_count 最多可接待人数
 * @property integer $join_count 报名人数
 * @property string $thumbs 活动图片
 * @property string $content 活动内容
 * @property string $created_time 发布时间
 * @property integer $shares 分享数
 * @property integer $collects 收藏数
 */
class Activity extends Base
{
    use Listable;

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wa_activities';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;

    const STATUS_JOIN = 1;

    const STATUS_FULL = 2;

    const STATUS_TEXT = [
        self::STATUS_JOIN => '待成团',
        self::STATUS_FULL => '已成团'
    ];

    public static function getStatusText($status)
    {
        return self::STATUS_TEXT[$status];
    }
    
    
}
